Products | Support | Email a link to this topic. | Send comments on this topic. | Back to Introduction | Help Version 19.0.6.1
|
The Leadtools.Svg.SvgDocument class represents a Scalable Vector Graphics (SVG) object. LEADTOOLS supports versions 1.0 and 1.1 of the SVG specification.
You can use one of the following methods to obtain an SVG document:
Load directly from an SVG file or stream by calling LoadFromFile, LoadFromStream and LoadFromMemory
Use RasterCodecs.LoadSvg. This method can convert a variety of document formats (such as PDF, Office formats, Text, RTF and many more) and vector formats (such as DXF and DWG) as well as SVG itself into an ISvgDocument which can be cast to Leadtools.Svg.SvgDocument.
Recognize any document using the LEADTOOLS OCR engine and save the results as SVG pages using IOcrDocument.Save with the DocumentFormat.Svg format
Load a document page as SVG using the LEADTOOLS Documents framework (Leadtools.Documents.Document)
Once you have an Leadtools.Svg.SvgDocument object, you can perform the following tasks:
Save it to a disk file or stream by calling SaveToFile or SaveToStream.
Get and set information about document bounds and resolution using IsFlat, Flat, CalculateBounds and Bounds. Refer to SVG Size, Bounds and Flat for more information.
Render the SVG document to a target device using Render. Refer to SVG Rendering for more information.
Enumerate and parse the text elements from the document using SortElements.
Use the SVG document as the data of a page when creating documents using DocumentWriter and DocumentSvgPage.
View the SVG in the LEADTOOLS Leadtools.Controls.ImageViewer using ImageViewerItem.SvgDocument or an SVG ImageViewerItem.Url.
Use SVG in Leadtools.Documents.UI.DocumentViewer.